<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 300px;
            height: 300px;
            background-color: purple;
        }
        .box1{
            width: 150px;
            height: 150px;
            background-color: red;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color: royalblue;
        }
    </style>
    <script src="jquery.min.js"></script>
</head>
<body>
    <div class="box">
        <div class="box1">
            <div class="box2"></div>
        </div>
    </div>
    <ul>
        <li>123456</li>
        <li>123456</li>
        <li>123456</li>
    </ul>
    <script>
        $(".box").on({
            click:function(){
                console.log("box");
            },
            mouseenter:function(){
                console.log("经过l");
            }
        })
        // off()方法移除通过on()方法添加的事件处理程序
        $(".box").off("click");

        //one()  方法绑定事件只会触发一次
        $("ul").one("click","li",function(){
            alert(111);

        })
    </script>
</body>
</html>